<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:69:"/data/www/sfadmin/public/../application/admin/view/article/index.html";i:1488527668;s:69:"/data/www/sfadmin/public/../application/admin/view/template/base.html";i:1488527668;s:77:"/data/www/sfadmin/public/../application/admin/view/article/sort_num_page.html";i:1488527668;}*/ ?>
﻿<head>
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="__LIB__/Hui-iconfont/1.0.7/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui.admin/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/app.css"/>
    
    <link href="//cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">

</head>
<body>

<nav class="breadcrumb">
    <div id="nav-title"></div>
    <!-- <a class="btn btn-success radius r btn-refresh" style="line-height:1.6em;margin-top:3px" href="javascript:;" title="刷新"><i class="Hui-iconfont"></i></a> -->
</nav>



<div class="pd-10 mt-30 master">
	<!-- 按钮组 -->
	<div class="cl pd-5 bg-1 bk-gray"> 
		<?php if(showAuth('admin/Article/add')): ?>
			<span class="f-l mr-5">
				<a class="btn btn-primary radius add-btn" data-title="添加资讯" data-url="<?php echo url('add'); ?>" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加资讯</a>
			</span>
		<?php endif; if(showAuth('admin/Article/batch_proc')): if(showAuth('admin/Article/delete')): ?>
				<span class="f-l mr-5">
					<a class="btn btn-danger batch-btn radius" data-title="删除" data-type="delete" data-url="<?php echo url('batch_proc'); ?>" href="javascript:;"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
				</span>
			<?php endif; if(showAuth('admin/Article/change_examine')): ?>
				<span class="f-l mr-5">
					<a class="btn btn-danger-outline batch-btn radius" data-title="审核禁止" data-type="disable" data-url="<?php echo url('batch_proc'); ?>" href="javascript:;"><i class="Hui-iconfont">&#xe6dd;</i> 批量禁止</a>
				</span> 

				<span class="f-l mr-5">
					<a class="btn btn-success-outline batch-btn radius" data-title="审核通过" data-type="pass" data-url="<?php echo url('batch_proc'); ?>" href="javascript:;"><i class="Hui-iconfont">&#xe6e1;</i> 批量通过</a>
				</span> 
			<?php endif; if(showAuth('admin/Article/change_on')): ?>
				<span class="f-l mr-5">
					<a class="btn btn-danger-outline batch-btn radius" data-title="下架" data-type="shelves" data-url="<?php echo url('batch_proc'); ?>" href="javascript:;"><i class="Hui-iconfont">&#xe6de;</i> 批量下架</a>
				</span> 
				<span class="f-l mr-5">
					<a class="btn btn-success-outline batch-btn radius" data-title="发布" data-type="release" data-url="<?php echo url('batch_proc'); ?>" href="javascript:;"><i class="Hui-iconfont">&#xe603;</i> 批量发布</a>
				</span> 
			<?php endif; endif; ?>
	</div>
	<!-- 搜索框 -->
	<div class="pd-5 bg-1 bk-gray">
		<form action="<?php echo url('/admin/article/index'); ?>" class="form-inline" role="form" id="search-form">

	        <span class="select-box  radius form-control ">
	          <select class="select arta-cid" size="1" name="cid">
	            <option value="" >请选择资讯分类</option>
	            <?php if(is_array($acTree) || $acTree instanceof \think\Collection): $i = 0; $__LIST__ = $acTree;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;if($v['pid'] == 0): ?>
	            		<option value="<?php echo $v['id']; ?>" disabled><?php echo $v['name']; ?></option>
						<?php if(is_array($acTree) || $acTree instanceof \think\Collection): $i = 0; $__LIST__ = $acTree;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v1): $mod = ($i % 2 );++$i;if($v1['pid'] == $v['id']): ?>
								<option value="<?php echo $v1['id']; ?>"<?php echo !empty($v1['id']) && $v1['id']==$cid?'selected':''; ?>>|—— <?php echo $v1['name']; ?></option>
							<?php endif; endforeach; endif; else: echo "" ;endif; endif; endforeach; endif; else: echo "" ;endif; ?>
	          </select>
	        </span>

			<input name="title" value="<?php echo $title; ?>" type="text" class="form-control"  placeholder="资讯名称">

			<div class="form-group">
				<input type="text" class="form-control datepicker-style start" name="start" value="<?php echo $start; ?>" placeholder="修改时间开始" readonly />
				~ 
				<input type="text" class="form-control datepicker-style stop" name="stop" value="<?php echo $stop; ?>" placeholder="修改时间结束" readonly />
			</div>

			<div class="radio-box">
				<input type="radio" id="s-3" name="is_examine" value="1" <?php echo !empty($is_examine) && $is_examine==1?'checked' : ''; ?>>
				<label for="s-3">通过</label>
			</div>
			<div class="radio-box">
				<input type="radio" id="s-4" name="is_examine" value="2" <?php echo !empty($is_examine) && $is_examine==2?'checked' : ''; ?>>
				<label for="s-4">禁止</label>
			</div>

			<div class="radio-box">
				<input type="radio" id="s-1" name="is_on" value="1" <?php echo !empty($is_on) && $is_on==1?'checked' : ''; ?>>
				<label for="s-1">发布</label>
			</div>
			<div class="radio-box">
				<input type="radio" id="s-2" name="is_on" value="2" <?php echo !empty($is_on) && $is_on==2?'checked' : ''; ?>>
				<label for="s-2">下架</label>
			</div>
			&nbsp;
			<button type="submit" class="btn btn-secondary radius mt-10">搜索  </button>
			<button type="button" class="btn btn-default radius mt-10 btn-reset">重置  </button>

		</form>
	</div>
	<!-- 主列表 -->
	<table class="table table-border table-bordered table-hover table-bg table-sort">
		<thead>
			<tr>
				<th scope="col" colspan="9" class="text-c va-m"><h3>资讯列表</h3></th>
			</tr>
			<tr class="text-c">
				<th class="va-m" width="7%">
				    <input type="checkbox" id="checkbox-1" class="select_all">
				    <label for="checkbox-1">全选</label>
				</th>
				<th class="va-m" width="10%">资讯分类</th>
				<th class="va-m" width="7%">排序值</th>
				<th class="va-m" width="10%">资讯标题</th>
				<th class="va-m" width="10%">缩略图</th>
				<th class="va-m" width="15%">修改时间</th>
				<th class="va-m" width="7%">审核状态</th>
				<th class="va-m" width="7%">发布状态</th>
				<th class="va-m">操作</th>
			</tr>
		</thead>
			<tbody>
		<?php if(is_array($info) || $info instanceof \think\Collection): $i = 0; $__LIST__ = $info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
				<tr class="text-c va-m">
					<td class="va-m"><input type="checkbox" name="article_id[]" class="ic-checkbox index-chkbox" value="<?php echo $v['id']; ?>" /></td>
					<td class="va-m"><?php echo getArticleClassifyName($v['cid']); ?></td>
					<td class="va-m">
						<input class="btn btn-primary size-MINI radius sort-btn" data-id=<?php echo $v['id']; ?> type="button" value="<?php echo $v['sort_num']; ?>">
					</td>
					<td class="va-m"><?php echo $v['title']; ?></td>
					<td class="image-td va-m">
						<!-- 图标 -->
						<img src=<?php echo showImage("article",$v['logo']); ?> alt="..." class="img-thumbnail" width="60" height="60">
						<!-- 隐藏的文件上传框 -->
						<input type="file" data-id=<?php echo $v['id']; ?> data-url="<?php echo url('/admin/article/uploadImage'); ?>" id="uploadImage<?php echo $v['id']; ?>" class="uploda-image" name="image" value="" style="display:none;"/>
					</td>
					<td class="va-m"><?php echo date("Y-m-d H:i:s",$v['update_time']); ?></td>
					<td data-examine="<?php echo $v['is_examine']; ?>" data-id="<?php echo $v['id']; ?>" class="va-m">
						<?php echo !empty($v['is_examine'])?'<a href="javascript:;" class="examine-btn"><span class="label label-success radius">通过</span></a>' : '<a href="javascript:;" class="examine-btn"><span class="label label-danger radius">禁止</span></a>'; ?>
					</td>
					<td data-on="<?php echo $v['is_on']; ?>" data-id="<?php echo $v['id']; ?>" class="va-m">
						<?php echo !empty($v['is_on'])?'<a href="javascript:;" class="on-btn"><span class="label label-success radius">发布</span></a>' : '<a href="javascript:;" class="on-btn"><span class="label label-danger radius">下架</span></a>'; ?>
					</td>
					<td class="va-m">
						<?php if(showAuth('admin/Article/details')): ?>
							<input class="btn btn-primary  radius  size-S details-btn" type="button" data-url="<?php echo url('details',['id'=>$v['id']]); ?>" data-title="详情" value="详情">
						<?php endif; if(showAuth('admin/Article/edit')): ?>
							<input class="btn btn-default  radius  size-S edit-btn" data-url="<?php echo url('edit',['id' => $v['id']]); ?>"  type="button"  value="编辑">
						<?php endif; if(showAuth('admin/Article/delete')): if($v['is_delete']): ?>
								<input class="btn btn-danger radius  size-S delete-btn" data-url="<?php echo url('delete'); ?>" data-id="<?php echo $v['id']; ?>" type="button" value="删除">
							<?php endif; endif; ?>
					</td>
				</tr>
		<?php endforeach; endif; else: echo "" ;endif; ?>
			</tbody>
	</table>
	<!-- 分页 -->
	<div class="ml-10">
	    <?php echo $info->render(); ?>
	</div>
</div>

<!-- 包含排序值表单页面 -->
<div id="sort_num_page" style="display: none;">
	<input type="test" name="sort_num" class="input-text radius sort_num" data-url="<?php echo url('admin/article/edit_sort_num'); ?>">
</div>

 

<script type="text/javascript">
    var exit_examine = "<?php echo url('/admin/article/change_examine'); ?>";
    var exit_on = "<?php echo url('/admin/article/change_on'); ?>";
</script>



<script type="text/javascript">
    var PUBLIC = '__PUBLIC__';
    var REQUIRE__JS = '__REQUIRE__JS__';
</script>
<!--require Js -->
<script src="__REQUIRE__JS__/require.config.js"></script>
<script src="__REQUIRE__JS__/require.js"></script>
<script src="__PUBLIC__/common/js/functions.js"></script>

	<script type="text/javascript" src="__AJS__/article/index.js"></script>

</body>
